package holder;

import utils.UIUtils;
import android.graphics.Color;
import android.view.View;
import android.widget.TextView;
import base.BaseHolder;
import bean.CategoryInfoBean;

public class CategoryTitleHolder extends BaseHolder<CategoryInfoBean> {

	private TextView tv;

	@Override
	protected View initHolderView() {
		tv = new TextView(UIUtils.getContext());
		int padding = UIUtils.dip2px(5);
		tv.setBackgroundColor(Color.WHITE);
		tv.setPadding(padding, padding, padding, padding);
		return tv;
	}

	@Override
	protected void refreshHolderView(CategoryInfoBean data) {
		tv.setText(data.title);
	}

}
